using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Reduce Junction Rule</para>
    /// <para>Adds a diagram rule to automatically reduce diagram junctions during diagram building based on an existing template. This tool reduces junctions based on several network junction source classes and object tables according to the number of other junctions to which they are connected.</para>
    /// <para>添加逻辑示意图规则，以在基于现有模板构建逻辑示意图期间自动减少逻辑示意图交汇点。此工具根据多个网络交汇点源类和对象表，根据它们所连接的其他交汇点的数量来减少交汇点。</para>
    /// </summary>    
    [DisplayName("Add Reduce Junction Rule")]
    public class AddReduceJunctionRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddReduceJunctionRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_inverse_source_selection">
        /// <para>Rule Process</para>
        /// <para><xdoc>
        ///   <para>Specifies how the specified junction source classes and object tables will be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Exclude source classes—Junctions based on the specified source classes and object tables will not be processed, while other junctions will be processed.</bullet_item><para/>
        ///     <bullet_item>Include source classes—Only junctions based on the specified source classes and object tables will be processed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理指定的联结源类和对象表。</para>
        ///   <bulletList>
        ///     <bullet_item>排除源类 - 将不处理基于指定源类和对象表的交汇点，而将处理其他交汇点。</bullet_item><para/>
        ///     <bullet_item>包括源类 - 仅处理基于指定源类和对象表的交汇点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AddReduceJunctionRule(object _in_utility_network, object _template_name, _is_active_value _is_active, _inverse_source_selection_value _inverse_source_selection)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
            this._inverse_source_selection = _inverse_source_selection;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Reduce Junction Rule";

        public override string CallName => "nd.AddReduceJunctionRule";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _inverse_source_selection.GetGPValue(), _junction_source, _connectivity_options.GetGPValue(), _unconnected_junctions.GetGPValue(), _one_connected_junction.GetGPValue(), _two_connected_junctions.GetGPValue(), _edges_attributes, _description, _out_utility_network, _out_template_name];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Rule Process</para>
        /// <para><xdoc>
        ///   <para>Specifies how the specified junction source classes and object tables will be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Exclude source classes—Junctions based on the specified source classes and object tables will not be processed, while other junctions will be processed.</bullet_item><para/>
        ///     <bullet_item>Include source classes—Only junctions based on the specified source classes and object tables will be processed. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理指定的联结源类和对象表。</para>
        ///   <bulletList>
        ///     <bullet_item>排除源类 - 将不处理基于指定源类和对象表的交汇点，而将处理其他交汇点。</bullet_item><para/>
        ///     <bullet_item>包括源类 - 仅处理基于指定源类和对象表的交汇点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rule Process")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _inverse_source_selection_value _inverse_source_selection { get; set; }

        public enum _inverse_source_selection_value
        {
            /// <summary>
            /// <para>Exclude source classes</para>
            /// <para>Exclude source classes—Junctions based on the specified source classes and object tables will not be processed, while other junctions will be processed.</para>
            /// <para>排除源类 - 将不处理基于指定源类和对象表的交汇点，而将处理其他交汇点。</para>
            /// </summary>
            [Description("Exclude source classes")]
            [GPEnumValue("EXCLUDE_SOURCE_CLASSES")]
            _EXCLUDE_SOURCE_CLASSES,

            /// <summary>
            /// <para>Include source classes</para>
            /// <para>Include source classes—Only junctions based on the specified source classes and object tables will be processed. This is the default.</para>
            /// <para>包括源类 - 仅处理基于指定源类和对象表的交汇点。这是默认设置。</para>
            /// </summary>
            [Description("Include source classes")]
            [GPEnumValue("INCLUDE_SOURCE_CLASSES")]
            _INCLUDE_SOURCE_CLASSES,

        }

        /// <summary>
        /// <para>Junction Sources</para>
        /// <para><xdoc>
        ///   <para>A list of the network junction source class (or classes) and object table (or tables) that will be excluded or included depending on the rule process.</para>
        ///   <para>When Rule Process is set to Include source classes (inverse_source_selection = "INCLUDE_SOURCE_CLASSES" in Python), the default, one or more network junction source classes or object tables will be processed. All diagram junctions related to network junctions that belong to those source classes and object tables are reduction candidates.
        ///   <para>The Add Reduce Junction Rule tool will process the junction source classes and object tables in the order of this list, from the junction class or table with the highest priority—the first class or table in the list—to the junction class or table with the lowest priority—the last class or table in the list.</para>
        ///   </para>
        ///   <para>When Rule Process is set to Exclude source classes (inverse_source_selection = "EXCLUDE_SOURCE_CLASSES" in Python), no particular junction source class or object table must be specified. In this case, all junctions in the generated diagrams, regardless of their source class or object table, will be reduced.</para>
        ///   <para>When specifying the SystemJunctions class among the network junction source classes, the rule will systematically process both system junctions and system junction objects.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>根据规则进程，将排除或包含的网络联结源类（或多个）和对象表（或多个）的列表。</para>
        /// <para>当“规则进程”设置为“包括源类”（Python 中为 inverse_source_selection = “INCLUDE_SOURCE_CLASSES”） 时，将处理默认的一个或多个网络联结源类或对象表。与属于这些源类和对象表的网络交汇点相关的所有逻辑示意图交汇点都是缩减候结。
        ///   <para>添加减少交汇规则工具将按此列表的顺序处理交汇点源类和对象表，从具有最高优先级的交汇点类或表（列表中的第一个类或表）到具有最低优先级的交汇点类或表（列表中的最后一个类或表）。</para>
        ///   </para>
        ///   <para>当“规则进程”设置为“排除源类”（Python 中为 inverse_source_selection = “EXCLUDE_SOURCE_CLASSES”） 时，无需指定特定的交汇点源类或对象表。在这种情况下，生成的逻辑示意图中的所有交汇点（无论其源类或对象表如何）都将减少。</para>
        ///   <para>在网络联结源类中指定 SystemJunctions 类时，规则将系统地处理系统联结和系统联结对象。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Junction Sources")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _junction_source { get; set; } = null;


        /// <summary>
        /// <para>Reduce Junctions With</para>
        /// <para><xdoc>
        ///   <para>Specifies the number of junction connections that will be considered for reduction.</para>
        ///   <bulletList>
        ///     <bullet_item>Maximum two connected junctions—Junctions with two or less connections will be considered. In this case, a specific process will be executed according to the number of candidate junction connections that will be reduced. This is the default.</bullet_item><para/>
        ///     <bullet_item>Minimum three connected junctions—Junctions with three or more connections will be considered. In this case, upstream traces will be executed to determine whether candidate junction connections will be reduced.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将考虑减少的交汇点连接数。</para>
        ///   <bulletList>
        ///     <bullet_item>最多两个连接的交汇点—将考虑具有两个或两个更少连接的交汇点。在这种情况下，将根据将减少的候选交汇点连接数执行特定过程。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>至少三个连接的交汇点—将考虑具有三个或更多连接的交汇点。在这种情况下，将执行上游跟踪以确定是否将减少候选交汇点连接。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reduce Junctions With")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _connectivity_options_value _connectivity_options { get; set; } = _connectivity_options_value._MAX_2_CONNECTED_JUNCTIONS;

        public enum _connectivity_options_value
        {
            /// <summary>
            /// <para>Maximum two connected junctions</para>
            /// <para>Maximum two connected junctions—Junctions with two or less connections will be considered. In this case, a specific process will be executed according to the number of candidate junction connections that will be reduced. This is the default.</para>
            /// <para>最多两个连接的交汇点—将考虑具有两个或两个更少连接的交汇点。在这种情况下，将根据将减少的候选交汇点连接数执行特定过程。这是默认设置。</para>
            /// </summary>
            [Description("Maximum two connected junctions")]
            [GPEnumValue("MAX_2_CONNECTED_JUNCTIONS")]
            _MAX_2_CONNECTED_JUNCTIONS,

            /// <summary>
            /// <para>Minimum three connected junctions</para>
            /// <para>Minimum three connected junctions—Junctions with three or more connections will be considered. In this case, upstream traces will be executed to determine whether candidate junction connections will be reduced.</para>
            /// <para>至少三个连接的交汇点—将考虑具有三个或更多连接的交汇点。在这种情况下，将执行上游跟踪以确定是否将减少候选交汇点连接。</para>
            /// </summary>
            [Description("Minimum three connected junctions")]
            [GPEnumValue("MIN_3_CONNECTED_JUNCTIONS")]
            _MIN_3_CONNECTED_JUNCTIONS,

        }

        /// <summary>
        /// <para>Reduce if unconnected</para>
        /// <para><xdoc>
        ///   <para>Specifies whether each unconnected network diagram junction candidate will be reduced. This parameter is only active when Reduce Junctions With is set to Maximum two connected junctions.
        ///   <bulletList>
        ///     <bullet_item>Checked—Unconnected network diagram junction candidates will be reduced. Each junction will be removed.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Unconnected network diagram junction candidates will not be reduced; they will be kept. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否将减少每个未连接的网络逻辑示意图交汇点候选。仅当“减少结点”设置为“最多两个连接的交汇点”时，此参数才处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中—将减少未连接的网络逻辑示意图候选交汇点。每个交汇点都将被移除。 </bullet_item><para/>
        ///     <bullet_item>未选中—未连接的网络逻辑示意图候选交汇点不会减少;它们将被保留。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reduce if unconnected")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _unconnected_junctions_value _unconnected_junctions { get; set; } = _unconnected_junctions_value._false;

        public enum _unconnected_junctions_value
        {
            /// <summary>
            /// <para>REDUCE_UNCONNECTED_JCT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REDUCE_UNCONNECTED_JCT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP_UNCONNECTED_JCT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_UNCONNECTED_JCT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Reduce if connected to a single junction</para>
        /// <para><xdoc>
        ///   <para>Specifies whether each network diagram junction reduction candidate that is connected to a single junction will be reduced. This parameter is only active when Reduce Junctions With is set to Maximum two connected junctions.
        ///   <bulletList>
        ///     <bullet_item>Checked—Network diagram junction reduction candidates that are connected to a single junction will be reduced. Each junction and its incident edge will be reduced onto its single connected junction.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Network diagram junction reduction candidates that are connected to a single junction will not be reduced; they will be kept. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否将减少连接到单个交汇点的每个网络逻辑示意图交汇点缩减候选项。仅当“减少结点”设置为“最多两个连接的交汇点”时，此参数才处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将减少连接到单个交汇点的网络逻辑示意图交汇点缩减候选项。每个交汇点及其入射边将减少到其单个连接的交汇点上。 </bullet_item><para/>
        ///     <bullet_item>未选中—连接到单个交汇点的网络逻辑示意图交汇点缩减候选节点将不被缩减;它们将被保留。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reduce if connected to a single junction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _one_connected_junction_value _one_connected_junction { get; set; } = _one_connected_junction_value._false;

        public enum _one_connected_junction_value
        {
            /// <summary>
            /// <para>REDUCE_JCT_TO_1JCT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REDUCE_JCT_TO_1JCT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP_JCT_TO_1JCT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_JCT_TO_1JCT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Reduce if connected to 2 different junctions</para>
        /// <para><xdoc>
        ///   <para>Specifies whether each network diagram junction reduction candidate that is connected to two other junctions will be reduced. This parameter is only active when Reduce Junctions With is set to Maximum two connected junctions.
        ///   <bulletList>
        ///     <bullet_item>Checked—Network diagram junction reduction candidates that connect two other junctions will be reduced. Each junction and its incident edges will be reduced onto a super span edge (the reduction edge). This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Network diagram junction reduction candidates that connect two other junctions will not be reduced; they will be kept.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否将减少连接到其他两个交汇点的每个网络逻辑示意图交汇点缩减候选项。仅当“减少结点”设置为“最多两个连接的交汇点”时，此参数才处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中—将缩减连接另外两个交汇点的网络逻辑示意图缩减候选节点。每个交汇点及其入射边将被简化为超跨边（缩减边）。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中—连接另外两个交汇点的网络逻辑示意图缩减候选节点将不被缩减;它们将被保留。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reduce if connected to 2 different junctions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _two_connected_junctions_value _two_connected_junctions { get; set; } = _two_connected_junctions_value._true;

        public enum _two_connected_junctions_value
        {
            /// <summary>
            /// <para>REDUCE_JCT_TO_2JCTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REDUCE_JCT_TO_2JCTS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP_JCT_TO_2JCTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_JCT_TO_2JCTS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Edge Attribute Names</para>
        /// <para><xdoc>
        ///   <para>The alias of the edge attributes adjacent to the junction reduction candidate.</para>
        ///   <para>The junction will be reduced only when all of its adjacent edges have the same values for each specified attribute alias.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>与结点缩减候选项相邻的边属性的别名。</para>
        ///   <para>仅当交汇点的所有相邻边对每个指定的属性别名具有相同的值时，交汇点才会被缩小。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Edge Attribute Names")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _edges_attributes { get; set; } = null;


        /// <summary>
        /// <para>Description</para>
        /// <para>The description of the rule.</para>
        /// <para>规则的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        public AddReduceJunctionRule SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}